package com.sdgakj.enums;

/**
 * @author limengyang 2016/10/17
 * 结算状态
 */
public enum EnumSettleState {

    //1-未打款  2-已打款  3-无需结算   4-打款失败  5-冻结  6-取消

    UNPLAY(1,"未打款"),
    PLAYEDMONEY(2,"已打款"),
    NOTPLAY(3,"无需结算"),
    PLAYFAILL(4,"打款失败"),
    FREEZE(5,"冻结"),
    CANCEL(6,"取消")
    ;

    private Integer code;

    private String name;

    EnumSettleState(Integer code, String name) {
        this.code = code;
        this.name = name;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static EnumSettleState getEnum(String value) {
        for (EnumSettleState e : EnumSettleState.values()) {
            if (value.equals(e.getCode())) {
                return e;
            }
        }
        return null;
    }
}
